// folktale中的compose , curry
const { compose, curry } = require("folktale/core/lambda");
const _ = require("lodash");
const { toUpper, first } = require("lodash/fp");

let f = curry(2, (x, y) => {
  return x + y;
});

let f1 = _.curry((x, y) => {
  return x + y;
});

// console.log(f(1, 2));
// console.log(f(1)(2));

// console.log(f1(1, 2))
// console.log(f1(1)(2));

let f_compose = compose(toUpper, first);
console.log(f_compose(["one", "two"]));

let l_compose = _.flowRight(toUpper, first);
console.log(l_compose(["one", "two"]));
